package com.lening.community.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lening.community.dto.BuildingDto;
import com.lening.community.pojo.Building;
import com.lening.community.vo.BuildingVo;
import com.lening.community.vo.TableVo;


import java.util.List;

/**
 * @ToDo:
 * @Author：潘万法
 * @date: 2024/6/3 16:55
 */
public interface BuildingMapper extends BaseMapper<Building> {
    /**
     * 查询
     * @param buildingDto
     * @return
     */
    Page<Building> page(BuildingDto buildingDto);

    /**
     * 三级联动，获取社区id
     * @param communityId
     * @return
     */
    List<Building> getCommunityId(Long communityId);
    /**
     * 三级联动，获取楼宇uid
     * @param BuildUid
     * @return
     */
    List<Building> getBuildUid(Long BuildUid);

    List<TableVo> getAllBui();

    /**
     * 详情
     * @param bid
     * @return
     */
    BuildingVo getById(Long bid);

    /**
     * 查询楼宇数量
     * @return
     */
    int getCount();

}
